<template>
  <div class="edit-box">
    <el-form label-width="120px" class="form-grid" :model="formData">
      <div class="form-box">
        <div class="item-left-box">
          <el-form-item label="订单号"><el-input v-model="formData.order_no" readonly /></el-form-item>
          <el-form-item label="商品类型名称"><el-input v-model="formData.goodsType_name" readonly /></el-form-item>

          <el-form-item label="商品图片">
            <div v-for="(image, index) in formData.goods_img" :key="index" style="display: inline-block; margin: 10px;">
              <el-image :src="$imageFull(image)" :initial-index="index" fit="cover" style="height: 80px;"></el-image>
            </div>
          </el-form-item>

          <el-form-item
            label="购买类型">{{formData.purchase_address_type >0 ? (formData.purchase_address_type == 2? '骑手就近购买':'指定店铺购买'):''}}</el-form-item>
          <el-form-item label="用户电话"><el-input v-model="formData.user_phone_number" readonly /></el-form-item>
          <el-form-item label="订单金额"><el-input v-model="formData.order_price" readonly /></el-form-item>
          <el-form-item label="总金额"><el-input v-model="formData.total_price" readonly /></el-form-item>



          <el-form-item label="邻工姓名"><el-input v-model="formData.neighborWorker_real_name" readonly /></el-form-item>
          <el-form-item label="邻工电话"><el-input v-model="formData.neighborWorker_tel" readonly /></el-form-item>
          <el-form-item label="建立时间"><el-input v-model="formData.create_time" readonly /></el-form-item>

        </div>

        <div class="item-right-box">

          <el-form-item label="收件地址">
            {{formData.deliveryAddress_address}}
          </el-form-item>

          <el-form-item label="收件码">
            {{formData.open_delivery_code}}
          </el-form-item>

          <el-form-item label="是否抢单">
            {{formData.is_grab_order_hall==1?'是':'否'}}
          </el-form-item>



          <el-form-item label="取件地址">
            {{formData.pickupAddress_address}}
          </el-form-item>
          <el-form-item label="取件码">
            {{formData.pick_up_code}}
          </el-form-item>

          <el-form-item label="售后状态">
            <el-tag
              :type="SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)] && SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)].type"
              disable-transitions>
              <i :class="SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)] && SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)].icon"
                style="margin-right: 4px" />
              {{ SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)] ? SERVICE_ORDER_AFTER_SALES_STATUS[String(formData.afterSales_status)].text : '-' }}
            </el-tag>
          </el-form-item>



          <el-form-item label="订单状态">
            <el-tag
              :type="NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)] && NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)].type"
              disable-transitions>
              <i :class="NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)] && NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)].icon"
                style="margin-right: 4px" />
              {{ NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)] ? NEIGHBOR_WORKER_ORDER_STATUS[String(formData.status)].text : '-' }}
            </el-tag>
          </el-form-item>

        </div>
      </div>





    </el-form>
  </div>
</template>

<script>
  import {
    NEIGHBOR_WORKER_ORDER_STATUS,
    SERVICE_ORDER_AFTER_SALES_STATUS
  } from '@/constants/statusMap';
  export default {
    name: "ReviewDetail",
    props: {
      formData: {
        type: Object,
        required: true
      }
    },
    data() {
      return {
        NEIGHBOR_WORKER_ORDER_STATUS,
        SERVICE_ORDER_AFTER_SALES_STATUS,
        remark: ""
      };
    },
    methods: {


    },
  };
</script>

<style scoped>
  .form-box {
    display: flex;
  }

  .edit-box {
    box-sizing: border-box;
    padding: 10px 40px 20px 10px;
  }

  .form-grid .el-form-item {
    margin-bottom: 20px;
  }

  .full-width {
    margin-top: 20px;
  }

  .full-width .el-input {

    width: 100%;
  }

  .btn-group {
    text-align: center;
  }

  .item-left-box {
    width: 50%;
  }

  .item-right-box {
    width: 50%;
  }
</style>
